-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add field type to query shape and extensive unit tests #140
Add field type to query shape and extensive unit tests #140
Conversation
...ain/java/org/opensearch/plugin/insights/core/service/categorizer/SearchQueryCategorizer.java
Show resolved
Hide resolved
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
52dab34
to
5239f68
Compare
dda1aa4
to
f05c5d2
Compare
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
f05c5d2
to
eb2877d
Compare
src/main/java/org/opensearch/plugin/insights/core/listener/QueryInsightsListener.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGenerator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGenerator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGenerator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGenerator.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks much better now. Minor comments to improve the readability
src/main/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGenerator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGenerator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGenerator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGenerator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGenerator.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
7026815
to
d67e5fc
Compare
src/main/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGenerator.java
Show resolved
Hide resolved
* Add query type to shape and extensive unit tests Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com> * Log query shape if trace log enabled Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com> * Refactor code, handle multifield with test, remove properties cache Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com> * Use only first index and optimization to get properties once per query Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com> * Further refactoring Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com> --------- Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com> (cherry picked from commit dcf52c2) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/query-insights/backport-2.17 2.17
# Navigate to the new working tree
pushd ../.worktrees/query-insights/backport-2.17
# Create a new branch
git switch --create backport/backport-140-to-2.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 dcf52c28a6bd7ed169c71fd8c006e56db7b73f13
# Push it to GitHub
git push --set-upstream origin backport/backport-140-to-2.17
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/query-insights/backport-2.17 Then, create a pull request where the |
* Add query type to shape and extensive unit tests * Log query shape if trace log enabled * Refactor code, handle multifield with test, remove properties cache * Use only first index and optimization to get properties once per query * Further refactoring --------- (cherry picked from commit dcf52c2) Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@deshsidd don't backport this to 2.17, this is for open source 2.18. |
Description
Add field type to query shape and integrate with the setting changes for
field_name
andfield_type
: #135Example
Field Mapping:
Query:
Query Shape:
Local Sanity Testing Logs
field_type
andfield_name
enabled/disabledresolves: #69